package com.sevenyear.excelanalyze.controller;

import com.sevenyear.excelanalyze.common.result.Result;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：SevenYear
 * @description：TODO
 * @date ：2021/8/7 22:01
 */
@RestController
@CrossOrigin
@Api(value = "登录接口",tags = "01-用户登录相关接口")
public class LoginController {


    @PostMapping("/user/login")
    public Result login() {
        return Result.ok().data("token","admin");
    }


    @GetMapping("/user/info")
    public Result info(){
        return Result.ok().data("roles","[admin]").data("name","admin").data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }

}
